home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 016a / cron24.zip / MANUAL.DOC < prev    next >
Text File  |  1991-05-29  |  18KB  |  442 lines

  1.  
  2.                                CRONJR
  3.                                  By
  4.                            Software Shorts
  5.  
  6.  
  7.           Thank you for retrieving CRONJR.  This is a full working 
  8.     copy of CRONJR.  The only difference between the evaluation  
  9.     copy and the one you pay for is that the one you pay for does 
  10.     not display the blinking green "evaluation" line and it does 
  11.     not play the two bars of the USC fight song upon loading and 
  12.     launching.  If you are still using this program after the 
  13.     two week evaluation period, please pay the required
  14.     registration fee of $45.00.  
  15.     
  16.  
  17.     Requirements
  18.     ------------
  19.  
  20.     MS-DOS based machine running MS-DOS 3.30 or higher.
  21.     MS-DOS versions below 3.30 may be used, but are not
  22.     recommended, since they require CRONJR to use more memory.
  23.  
  24.  
  25.     Background
  26.     ----------
  27.  
  28.          The reason for designing CRONJR was for lack of anything
  29.     better in the MS-DOS world.  Simple but powerful programs
  30.     like  cron (part of AT&T's Unix) or Sleeper  (public domain
  31.     for HP's MPE) are non existent for PC's.
  32.  
  33.          With more and more companies moving from mini-computers
  34.     to PC based LANs, one of the many things that has been lost
  35.     was the ability to schedule the nightly reporting and
  36.     maintenance programs needed to keep a business working during
  37.     the day.
  38.  
  39.          Sure, it's possible to just write a large batch file
  40.     that will run all your programs one after another.  That
  41.     solution is fine if it meets your needs.  But if you need
  42.     programs to run at specific times, and especially if your
  43.     business revolves around a LAN, then this product is for you.
  44.  
  45.     The solution
  46.     ------------
  47.  
  48.          There are 3 methods of scheduler implementation in a DOS
  49.     environment.
  50.  
  51.     Method 1
  52.  
  53.          Make a background RAM resident program that will
  54.          pop up when it is time to run the tasks.
  55.  
  56.     Method 2
  57.  
  58.          Make a foreground program that loads the tasks as
  59.          child processes.
  60.  
  61.     Method 3
  62.  
  63.          Make a transient program that is only in memory
  64.          when it is needed.  Therefore, all memory is
  65.          available for the task.
  66.  
  67.  
  68.     Faults for method 1
  69.     --------------------
  70.  
  71.          The last thing the world needs is another RAM
  72.          resident program to eat up memory, steal clock
  73.          cycles, and substitute custom interrupt vectors.  Most
  74.          LAN users already use 20-70k for their network shell,
  75.          and even more if they are running a NETBIOS emulator.
  76.  
  77.          The way most resident schedulers work is to stuff the
  78.          keyboard when it is time to execute a task.  This
  79.          method can be seen in various automatic tape backup
  80.          programs.  This method is unreliable since the assumption
  81.          is made that the DOS prompt is available, the command
  82.          line is clear, and the path is set.
  83.  
  84.     Faults for method 2
  85.     -------------------
  86.  
  87.          This method requires too much memory.  If you want to
  88.          run a batch file then you have to load another version
  89.          of COMMAND.COM on top of the parent scheduler.
  90.  
  91.     Why method 3 is so swell
  92.     ------------------------
  93.  
  94.          1. It is so simple.  It relies heavily on two simple
  95.        operating system level batch files.
  96.  
  97.          2. It is not RAM resident so it uses no memory(*).
  98.  
  99.          *  The dreaded asterisk - If you are using a DOS
  100.        version below 3.3 then around 23k is lost because
  101.        COMMAND.COM needs to be invoked a second time.
  102.        It is strongly recommend that DOS 3.30 or above is
  103.        used.
  104.  
  105.  
  106.     How it works
  107.     ------------
  108.  
  109.          1.  The schedule file CRONJR.SCH is created by you. It
  110.     contains the timing parameters for the tasks to be executed.
  111.  
  112.          2. The master batch file, CRONJR.BAT, is loaded from the
  113.     command line.  That is your last intervention.
  114.  
  115.          3. The work file, CRONWK.BAT, is deleted by CRONJR.BAT.
  116.  
  117.          4. The scheduler program, CRON.EXE, is loaded and the
  118.     schedule file CRONJR.SCH is read.
  119.  
  120.          5. When the time comes to execute a process CRON.EXE
  121.     dumps its scheduling information to CRONJR.JOB, writes the
  122.     CRONWK.BAT bat file and unloads from memory to return control
  123.     to CRONJR.BAT.
  124.  
  125.          6. If CRONJR.BAT can find CRONWK.BAT then the CRONWK.BAT
  126.     work file is called/executed.
  127.  
  128.          7. Upon completion of CRONWK.BAT, control is returned to
  129.     CRONJR.BAT which then executes CRONJR.BAT (thus ending the
  130.     original CRONJR.BAT execution) with the parameter RELOAD
  131.     which is passed to CRON.EXE in step 4, which causes the file
  132.     CRONJR.JOB to be loaded rather than the file CRONJR.SCH .
  133.  
  134.  
  135.          Hard to follow?  Try this one. It is the remedial
  136.     version.
  137.  
  138.     CRONJR.BAT -> CRON.EXE -> CRONWK.BAT (YOUR TASK) ->CRONJR.BAT
  139.         A.           B.            C.                     A.
  140.  
  141.     Installation
  142.     ------------
  143.  
  144.          Create a directory for CRONJR, any name will do, and
  145.     copy the CRON.EXE program into the new directory. If you are
  146.     going to use CRONJR on a LAN with multiple machines running
  147.     CRONJR, then you must make a separate directory for each
  148.     machine.
  149.    
  150.     Examples:
  151.  
  152.          F:\CRON\386
  153.          F:\BOB\CRON
  154.          F:\CRON\486
  155.          F:\ACCTNG\CRON
  156.    
  157.          Each directory must contain its own CRONJR.SCH file and
  158.     its own unique CRONJR.BAT file.  A path may be set to point
  159.     to the location of CRON.EXE.
  160.    
  161.           For each CRONJR directory created, type CRON START at
  162.     their respective DOS prompt.  Such as:
  163.  
  164.          F:\CRON\386>cron start
  165.  
  166.          This will create the CRONJR.BAT file which is specific
  167.     to its home directory.  If you type out the CRONJR.BAT file
  168.     you will understand.
  169.  
  170.          Create a flat ASCII file (no tabs) named CRONJR.SCH or
  171.     edit the one on the distribution diskette.  Enter one task
  172.     per line using the following format.
  173.  
  174.     minute  hour  day_of_month  month  day_of_week  executable parm_list
  175.  
  176.          Example
  177.          -------
  178.  
  179.          50  16  *   *     MOTUWETHFR    f:\public\bin\killuser.EXE
  180.          0   17  *   *     MOTUWETHFR    f:\mtn_tape\databack.bat
  181.          0   5   *   *     MO            g:\acctng\weekly.bat
  182.          0   1   1   *   SUMOTUWETHFRSA  G:\ACCTNG\MONTHEND.EXE
  183.          0   1   1   1   SUMOTUWETHFRSA  G:\ACCTNG\YEARLY.EXE
  184.          49  16  *   *     MOTUWETHFR    C:\FUNNY\GOHOME.EXE
  185.          2i  *   *   *     MOTUWETHFR    F:\stream\kevin.bat
  186.          *   1i  *   *     MOTUWETHFR    q:\hourly\bak2work.exe
  187.          30  12  *   *         WE        nopath.com
  188.          06  30  *   *   SA              u:\palitape\tna2tape.exe /a q /optic
  189.     
  190.     Type CRONJR at the DOS prompt and you are finished.
  191.  
  192.          Field definitions
  193.          -----------------
  194.  
  195.          minute......: the minute of the hour you want your
  196.                        schedule to execute, 0 through 59.
  197.          hour........: the hour of the day in military time,
  198.                        0 through 23.
  199.          day_of_month: the day of the month 1 through 31.
  200.          month.......: the month of the year 1 through 12.
  201.          day_of_week.: the day of the week, SU MO TU WE TH FR SA.
  202.          executable..: a DOS executable string, .BAT, .EXE, and
  203.                        .COM files with a maximum combined path of
  204.                        64 characters.   EXTENTIONS MUST BE USED!!!!!!
  205.          parm_list...: optional parameters to be passed to the executable.
  206.                        Maximum of 128 characters. 
  207.  
  208.          Wild cards and increments
  209.          -------------------------
  210.  
  211.          *: execute on every occurrence - not used by day_of_week .
  212.          i: execute in increments - only applies to minute and
  213.             hour.  The 7th line in the example shows 2i which
  214.             means execute in 2 minute increments.  In theory this
  215.             task could be executed 30 times a hour.  Obviously *
  216.             must be used for every level after the first i .
  217.             Combinations of i in the minute and hour are not
  218.             allowed.  The expected outcome is that only the
  219.             hour increment will be used.  If 'i' is used with the
  220.             hour, then the minute should be *, otherwise
  221.             execution will occur in x hour increments, but only
  222.             on the specified minute.  Thus 30 1i does not mean
  223.             execute every 90 minutes, but execute hourly on the
  224.             30th minute of the hour.
  225.  
  226.          Launch time
  227.          -----------
  228.  
  229.              Task checking and launching occur on the 1st second of
  230.          the minute.
  231.  
  232.  
  233.     EXTREMELY IMPORTANT
  234.     -------------------
  235.  
  236.          Be very careful when assigning launch times.  A 'feature'
  237.     of CRONJR is that it only launches tasks when CRON.EXE is
  238.     resident.  Example: you have 2 tasks set to execute at 19:00,
  239.     each takes 20 minutes to run, and few tasks scheduled at
  240.     19:15.  At 19:00 all 19:00 tasks are tagged for launching and
  241.     the first task will be launched at 19:00.  The 2nd task will
  242.     be launched when CRON.EXE is reloaded and thus effectively
  243.     launched at 19:20.
  244.  
  245.          Well it is now 19:40 and all tasks scheduled from 19:01
  246.     through 19:40 have missed their launch window.
  247.  
  248.          To prevent this from happening you should do the
  249.     following.  Schedule enough time between tasks.  The 19:15
  250.     tasks in the example should have been set later to 20:00, or
  251.     earlier to 19:00.  Had they been scheduled at 19:00 then they
  252.     would have run as part of the 19:00 launching.
  253.  
  254.  
  255.     Proper scheduling
  256.     -----------------
  257.  
  258.          The best way to debug a faulty schedule is to run
  259.     CRON.EXE instead of CRONJR.BAT, and use the F1 key to exit to
  260.     DOS and change the time.  Inspect the CRONWK.BAT file that is
  261.     created.
  262.  
  263.          There is no limit to the number of tasks you can put
  264.     into the CRONJR.SCH file.
  265.  
  266.  
  267.     Common problems
  268.     ---------------
  269.        CRONJR program is running, and exits to DOS and does nothing.
  270.           Problem: Running CRON instead of CRONJR.
  271.           Problem: Did not run CRON START in the execution directory.
  272.  
  273.        CRONJR does not execute the programs listed in CRONJR.SCH
  274.           Problem: Could not find the programs.  Need to specify the
  275.                    path in the CRONJR.SCH file or set a DOS path.
  276.           Problem: You did not specify .BAT, .EXE, or .COM . 
  277.           Problem: Your scheduling parameters are incorrect. Most 
  278.                    likely day_of_the_week not included.  I.e. You
  279.                    are testing on Saturday a job you have set up
  280.                    to run Monday through Friday.
  281.  
  282.        CRONJR playes this obnoxious fight song when it executes.
  283.           Problem: Running the evaluation version.
  284.  
  285.  
  286.     The competition
  287.     ---------------
  288.  
  289.          It was mentioned earlier that there are no programs
  290.     available similar to CRONJR.  Well that is no longer true.
  291.     There is product called PS-Batch from Brightwork Development.
  292.     Its list price is around $595.00, it must be licensed per
  293.     file server, it uses about 40k of memory and it is limited
  294.     to Netware.  CRONJR on the other hand is available for
  295.     $45.00, licensing is per site - not batch station or server,
  296.     it uses 0k of memory and will work on ANY LAN or stand alone
  297.     PC.
  298.  
  299.          I am sure PS-Batch is a fine product and has many more
  300.     features than CRONJR.  Many of these features were purposely
  301.     designed out of the original versions of CRONJR.
  302.  
  303.     Anomalies and hints
  304.     -------------------
  305.  
  306.          There are two known anomalies and one other point that you
  307.     need to remember.
  308.  
  309.          Anomaly 1.  Cronjr only executes tasks on the 1st second
  310.     of the minute.  Example.  If you had 3 tasks that each take 5
  311.     seconds to complete, and they are all scheduled to launch at
  312.     19:00 then they will be effectively launched at 19:00, 19:01
  313.     and 19:02.  This feature was designed into the product.
  314.  
  315.          Anomaly 2.  Anomaly 2 arises out of anomaly 1.  Example.
  316.     If you set up a schedule that has 3 jobs, each set to run in
  317.     increments of 10 minutes (10i * * * ...), you would assume
  318.     that they would execute at the 10, 20, 30, 40, 50, 00 minute
  319.     clock demarcations (assuming that the first launch minute was
  320.     hh:00) and always launch one after the other. In reality this
  321.     is not true.
  322.  
  323.  
  324.          The first launching schedule would look like this.
  325.  
  326.          1a. Job #1 launches at the first available minute.
  327.  
  328.          2a. Job #2 launches at the first available minute
  329.         after Job #1 completes.
  330.  
  331.          3a. Job #3 launches at first available minute after Job
  332.         #2 completes.
  333.  
  334.          The second and subsequent launchings might look like
  335.     this.
  336.  
  337.          1b. Job #1 launches 10 minutes after its's first
  338.         launching or at the first available minute after
  339.         Job #3 finishes or it may launch the first available
  340.         minute after Job #1 if Job #1 takes more than 10
  341.         minutes.
  342.  
  343.          2b. and 3b.  Who knows.
  344.  
  345.          The best way to get around this confusion is to do one
  346.     of three things.
  347.  
  348.          1. Carefully plan and test your incremental launchings.
  349.  
  350.          2. Rather than make your launchings incremental, make
  351.     them minute specific.  This may involve multiple line entries
  352.     into the CRONJR.SCH file for he same job at different times.
  353.  
  354.          3. Make Jobs 1, 2 and 3 one job.
  355.  
  356.          The one thing you must remember.  The CRONJR.SCH file is
  357.     only loaded at the initial load time.  If you are running
  358.     CRONJR on a LAN and CRONJR is running on a remote machine and
  359.     you modify the remote machine's CRONJR.SCH file,  the remote
  360.     CRONJR will not reflect any of the changes made in the new
  361.     CRONJR.SCH file until the remote CRONJR is aborted and
  362.     reloaded.
  363.  
  364.  
  365.     Getting legal
  366.     -------------
  367.  
  368.          Software Shorts hereby disclaims all warranties relating
  369.     to this software, whether expressed or implied, including
  370.     without limitation any implied warranties of merchantability
  371.     or fitness for a particular purpose.  Software Shorts will
  372.     not be liable for any special, incidental, consequential,
  373.     indirect or similar damages due to loss of data or any other
  374.     reason, even if Software Shorts or an agent of Software
  375.     Shorts has been advised of the possibility of such damages.
  376.     Software Shorts will not be liable for any damages due to
  377.     malicious third party augmentation of the executable program.
  378.     In no event shall Software Shorts's liability for any damages
  379.     ever exceed the price paid for the license to use software,
  380.     regardless of the form of the claim.  The person using the
  381.     software bears all risk as to the quality and performance of
  382.     the software.
  383.  
  384.     Acknowledgements
  385.     ----------------
  386.  
  387.     Unix, cron and AT&T are registered trademarks of American
  388.          Telephone and Telegraph Corporation.
  389.     MPE and HP are copyrights of Hewlett Packard Company.
  390.     Sleeper is available through INTEREX
  391.     MS-DOS is a registered trademarks of Microsoft Corporation.
  392.     NetWare is a registered trademark of Novell Incorporated
  393.     PS-Batch is a trademark of Brightwork Development Incorporated
  394.  
  395.     Software Shorts is not affiliated with any of the above
  396.     mentioned companies.
  397.  
  398.     One last word
  399.     -------------
  400.    
  401.          Software Shorts is dedicated to the creation and
  402.     dissemination of short, single focus, utility programs for
  403.     programmers.  Hence the name Software Shorts.  In the
  404.     tradition of true software geeks, Software Shorts believes
  405.     utility programs should be inexpensive, if not free, and in
  406.     the hands of as many people as possible.  However, Software
  407.     Shorts utility programs may not be distributed by any
  408.     individual or corporation as part of a commercial software
  409.     release, unless the utility has been licensed to that
  410.     individual or corporation for such distribution.
  411.    
  412.          The first version of CRONJR was released in November of
  413.     1988.  It has been thoroughly debugged.  It has also been in
  414.     constant use since that time, with it now being May 1991.
  415.  
  416.          If you use CRONJR after the two week evaluation period,
  417.     please pay the $45.00 registration fee.  The $45.00
  418.     registration fee will entitle you to a version of CRONJR with 
  419.     the fight song removed.  Payment of the $75.00 registration 
  420.     and update fee will entitle you to the "silent" version of 
  421.     CRONJR and any future releases of CRONJR.
  422.  
  423.     Send registration fees to:
  424.     
  425.         Software Shorts
  426.         14101 Yorba Street  Suite 101
  427.         Tustin, CA 92680
  428.  
  429.     Please specify the desired media format as 5.25/360k or 3.5/720k.
  430.      
  431.     
  432.          Since the primary distribution of this program will be
  433.     via bulletin boards and the targeted end users are LAN
  434.     managers, and programmers, it is strongly recommended that
  435.     you purchase a registered version of CRONJR for your own
  436.     security reasons. 
  437.     
  438.          If you have received CRONJR as part of a distribution
  439.     diskette included with a book, please note that Software
  440.     Shorts provided its product, with permission, at no charge 
  441.     to the publisher.
  442.